package com.trg.designmodel.flyweight;

/**
 * @ClassName: ConcreteWebSite
 * @Description: 具体的网站
 * @Author: tangrg
 * @Date: 2021/7/8 11:40
 * @Version: 1.0
 * @Return:
 **/
public class ConcreteWebSite extends WebSite {

    //共享的部分，内部状态
    private String type = "";

    public ConcreteWebSite(String type) {
        this.type = type;
    }

    @Override
    public void use(User user) {
        System.out.println("网站的发布者类型为：" + type + " 使用者为：" + user.getName());
    }

}
